//
//  XRChatToolbar.h
//  YWBaseFrameWork
//
//  Created by 余伟 on 2017/1/22.
//  Copyright © 2017年 NeiQuan. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "XRPlaceHolderTextView.h"


@class XRChatToolbar;
@protocol XRChatToolbardelegate <NSObject>

@optional

-(void)didsendMessage:(NSString *)message view:(XRChatToolbar*)chatToolBar;


-(void)inputTextViewWillBeginEditing:(XRPlaceHolderTextView*)inputTextView;

-(void)inputTextViewDidBeginEditing:(XRPlaceHolderTextView*)inputTextView;



@end
@interface XRChatToolbar : UIView

@property (nonatomic, readonly) CGFloat inputViewMaxHeight;

@property (nonatomic, readonly) CGFloat inputViewMinHeight;

@property (nonatomic, readonly) CGFloat horizontalPadding;

@property (nonatomic, readonly) CGFloat verticalPadding;

@property(nonatomic,weak)id<XRChatToolbardelegate>delegate;

/**
 *  用于输入文本消息的输入框
 */
@property (strong, nonatomic) XRPlaceHolderTextView *inputTextView;

- (instancetype)initWithFrame:(CGRect)frame;

/**
 *  初始化chat bar
 * @param horizontalPadding  default 8
 * @param verticalPadding    default 5
 * @param inputViewMinHeight default 36
 * @param inputViewMaxHeight default 150
 */
- (instancetype)initWithFrame:(CGRect)frame
            horizontalPadding:(CGFloat)horizontalPadding
              verticalPadding:(CGFloat)verticalPadding
           inputViewMinHeight:(CGFloat)inputViewMinHeight
           inputViewMaxHeight:(CGFloat)inputViewMaxHeight;

@end
